{layout name="public/layout" /}
{include file='yxnavbar'}


<style type="text/css">
    .tuan_div{
        height: 36px;
    }
    .tuan_div300{
        height: 200px;
    }
    .tuan_title{
        width: 140px;
        text-align: right;
        font-size: 14px;
        color: #606266;
        font-weight: 700;
        padding-right: 12px;
    }
    .right_btn{
        display: inline-block;
        float: right;
        border: 1px solid #ff4949;
        padding: 4px 8px;
        color: #ff4949;
        font-size: 12px;
        background: #ffeded;
        border-radius: 3px;
    }
    .ml100{
        margin-left: 100px !important;
    }
    .right_btn_blue{
        color: #ffffff;
        background-color: #1890ff;
        border-color: #1890ff;
    }
    .layui-layer-shade{
        z-index: 1 !important;
    }
    .layui-layer-page{
        z-index: 2 !important;
    }
    .minuteselect,.hourselect{
        min-width: 80px;
    }
    .fds_title{
        font-size: 14px;
        color: #999;
        border: 0;
        border-top: 1px solid #ccc;
        padding: 0;
    }
    .lgd_inner{
        margin: 0 auto;;
        padding: 0 10px;
        width: unset;
        font-size: unset;
        margin-bottom: 20px;
    }
</style>
<div class="main">
    {include file='../../plugin/education/template/web/common_nav'}
    <!--    视频显示位置-->
    <form action="" method="post" class="form-horizontal" role="form" name="form5" id="form5">
        <!--    颜色样式布局设置-->
        <input type="hidden" name="op" value="common_style_setting">
        <div class="panel panel-default" role="tabpanel">
            <div class="panel-heading">页面样式设置</div>
            <div class="panel-body">
                <div class="form-horizontal">
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">配色主题</label>
                        <div class="col-sm-2 col-xs-12">
                            <select  class="form-control" name="temp_theme">
                                {loop $temp_theme $row}
                                <option value="{$row['value']}" {if $item['colors']['temp_theme'] == $row['value'] }selected="selected"{/if}>{$row['value']} - {php echo mb_substr($row['title'],0,8,'utf-8');}</option>
                                {/loop}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">已购数量显示</label>
                        <div class="col-sm-8 col-xs-12" style="padding-top: 6px;">
                            <input  name="show_buy_total" value="1" {if $show_buy_total==1 || !$show_buy_total} checked="checked"{/if} type="radio"> 不显示
                            &nbsp;&nbsp;
                            <input  name="show_buy_total" value="2" {if $show_buy_total==2 } checked="checked"{/if} type="radio"> 显示
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">首页底部按钮</label>
                        <div class="col-sm-8 col-xs-12" style="padding-top: 6px;">
                            <input  name="btn_style" value="1" {if $item['btn_style']==1 || !$item['btn_style']} checked="checked"{/if} type="radio"> 分散展示
                            &nbsp;&nbsp;
                            <input  name="btn_style" value="2" {if $item['btn_style']==2 } checked="checked"{/if} type="radio"> 聚合展示
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">右侧浮标位置</label>
                        <div class="col-sm-8 col-xs-12" style="padding-top: 6px;">
                            <input  name="float_icon_show" value="1" {if $item['float_icon_show']==1 || !$item['float_icon_show']} checked="checked"{/if} type="radio"> 顶部
                            &nbsp;&nbsp;
                            <input  name="float_icon_show" value="2" {if $item['float_icon_show']==2 } checked="checked"{/if} type="radio"> 底部
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">福利领取记录</label>
                        <div class="col-sm-2 col-xs-12" style="padding-top: 6px;">
                            <input  name="flag_show" value="1" {if $item['flag_show']==1 || !$item['flag_show']} checked="checked"{/if} type="radio"> 显示
                            &nbsp;&nbsp;
                            <input  name="flag_show" value="2" {if $item['flag_show']==2 } checked="checked"{/if} type="radio"> 不显示
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">别名</span>
                                <input  type="text"  class="form-control"  placeholder="请输入福利领取记录别名" name="flag_name" value="{$item['other_name']['flag_name']}">
                            </div>
                        </div>
                        <div class="col-sm-5 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">背景颜色</span>
                                {php echo view_form_field_color('getLi_c',$item['colors']['getLi_c']);}
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">别名综合设置</label>
                        <div class="col-sm-2 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">校区</span>
                                <input  type="text"  class="form-control"  placeholder="请输入别名" name="school_other_name" value="{$school_other_name}">
                            </div>
                        </div>
                        <div class="col-sm-2 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">课程</span>
                                <input  type="text"  class="form-control"  placeholder="请输入别名" name="course_other_name" value="{$course_other_name}">
                            </div>
                        </div>
                        <div class="col-sm-2 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">赠品</span>
                                <input  type="text"  class="form-control"  placeholder="请输入别名" name="gift_other_name" value="{$gift_other_name}">
                            </div>
                        </div>
                        <div class="col-sm-2 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">开团成功</span>
                                <input  type="text"  class="form-control"  placeholder="请输入别名" name="open_tuan_other_name" value="{$open_tuan_other_name}">
                            </div>
                        </div>
                    </div>


                </div>
            </div>
        </div>

        <div class="panel panel-default" role="tabpanel">
            <div class="panel-heading">头像区域</div>
            <div class="panel-body">
                <div class="form-horizontal">
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">颜色设置</label>
                        <div class="col-sm-2 col-xs-12" style="padding-top: 6px;">
                            <input  name="education_acBar_c1_open" value="1" {if $education_acBar_c1_open==1 || !$education_acBar_c1_open} checked="checked"{/if} type="radio"> 显示
                            &nbsp;&nbsp;
                            <input  name="education_acBar_c1_open" value="2" {if $education_acBar_c1_open==2 } checked="checked"{/if} type="radio"> 不显示
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('acBar_c1',$item['colors']['acBar_c1']);}
                            <span class="help-block">渐变色1</span>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('acBar_c2',$item['colors']['acBar_c2']);}
                            <span class="help-block">渐变色2</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">倒计时区</label>
                        <div class="col-sm-2 col-xs-12" style="padding-top: 6px;">
                            <input  name="djs_show" value="1" {if $item['djs_show']==1 || !$item['djs_show']} checked="checked"{/if} type="radio"> 显示
                            &nbsp;&nbsp;
                            <input  name="djs_show" value="2" {if $item['djs_show']==2 } checked="checked"{/if} type="radio"> 不显示
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">别名</span>
                                <input  type="text"  class="form-control"  placeholder="请输入活动倒计时别名" name="djs_name" value="{$item['other_name']['djs_name']}">
                            </div>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('acPeo_c',$item['colors']['acPeo_c']);}
                            <span class="help-block">活动倒计时 边框颜色</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">滚动头像</label>
                        <div class="col-sm-2 col-xs-12" style="padding-top: 6px;">
                            <input  name="scrool_icon_show" value="1" {if $scrool_icon_show==1 || !$scrool_icon_show} checked="checked"{/if} type="radio"> 显示
                            &nbsp;&nbsp;
                            <input  name="scrool_icon_show" value="2" {if $scrool_icon_show==2 } checked="checked"{/if} type="radio"> 不显示
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('acBar_c_bak',$item['colors']['acBar_c_bak']);}
                            <span class="help-block">背景颜色</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">火热进行</label>
                        <div class="col-sm-2 col-xs-12" style="padding-top: 6px;">
                            <input  name="activity_show" value="1" {if $item['activity_show']==1 || !$item['activity_show']} checked="checked"{/if} type="radio"> 显示
                            &nbsp;&nbsp;
                            <input  name="activity_show" value="2" {if $item['activity_show']==2 } checked="checked"{/if} type="radio"> 不显示
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">别名</span>
                                <input  type="text"  class="form-control"  placeholder="请输入活动火热进行中别名" name="activity_name" value="{$item['other_name']['activity_name']}">
                            </div>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('hotAc_c',$item['colors']['hotAc_c']);}
                            <span class="help-block">活动火热进行中 边框颜色</span>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <div class="panel panel-default" role="tabpanel">
            <div class="panel-heading">联盟商家</div>
            <div class="panel-body">
                <div class="form-horizontal">
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">位置样式</label>
                        <div class="col-sm-4 col-xs-12" style="padding-top: 6px;">
                            <div style="display: block">
                                <input  name="company_show" value="0" {if $item['company_show']==0 || !$item['company_show']} checked="checked"{/if} type="radio"> 不显示
                                &nbsp;&nbsp;
                            </div>


                            <div style="display: block">
                                <input  name="company_show" value="4" {if $item['company_show']==4 } checked="checked"{/if} type="radio"> 底部-样式[视频]
                                &nbsp;&nbsp;
                            </div>
                            <div style="display: block">
                                <input  name="company_show" value="5" {if $item['company_show']==5 } checked="checked"{/if} type="radio"> 底部-样式[图片卡]
                                &nbsp;&nbsp;
                            </div>
                            <div style="display: block">
                                <input  name="company_show" value="6" {if $item['company_show']==6 } checked="checked"{/if} type="radio"> 底部-样式[视频+图片卡]
                            </div>
                        </div>
                        <div class="col-sm-4 col-xs-12" style="padding-top: 6px;">
                            <div style="display: block">
                                <input  name="company_show" value="2" {if $item['company_show']==2 } checked="checked"{/if} type="radio"> 顶部-样式[图片卡]
                                &nbsp;&nbsp;
                            </div>
                            <div style="display: block">
                                <input  name="company_show" value="1" {if $item['company_show']==1} checked="checked"{/if} type="radio"> 顶部-样式[视频]
                                &nbsp;&nbsp;
                            </div>
                            <div style="display: block">
                                <input  name="company_show" value="3" {if $item['company_show']==3 } checked="checked"{/if} type="radio"> 顶部-样式[视频+图片卡]
                                &nbsp;&nbsp;
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">商家介绍</label>
                        <div class="col-sm-8 col-xs-12" style="padding-top: 6px;">
                            <input  name="company_list_show" value="1" {if $company_list_show==1 || !$company_list_show} checked="checked"{/if} type="radio"> 显示
                            &nbsp;&nbsp;
                            <input  name="company_list_show" value="2" {if $company_list_show==2 } checked="checked"{/if} type="radio"> 不显示
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 col-xs-12 control-label">配色设置</label>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('shop_logo_c',$item['colors']['shop_logo_c']);}
                            <span class="help-block" style="color: #5c99f7;">Logo轮播边框颜色</span>
                            {php echo view_form_field_color('shop_item_c',$item['colors']['shop_item_c']);}
                            <span class="help-block">商家信息背景色</span>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('shop_card_c1',$item['colors']['shop_card_c1']);}
                            <span class="help-block" style="color: #07c160">图片卡轮播 渐变色1</span>
                            {php echo view_form_field_color('shop_card_c2',$item['colors']['shop_card_c2']);}
                            <span class="help-block" style="color: #07c160">图片卡轮播 渐变色2</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel panel-default" role="tabpanel">
            <div class="panel-heading">选项卡</div>
            <div class="panel-body">
                <div class="form-horizontal">
                    <div class="form-group">
                        <label class="col-sm-2 col-xs-12 control-label">背景颜色</label>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('acCho_c1',$item['colors']['acCho_c1']);}
                            <span class="help-block">渐变色1</span>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('acCho_c2',$item['colors']['acCho_c2']);}
                            <span class="help-block">渐变色2</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">活动介绍</label>
                        <div class="col-sm-2 col-xs-12" style="padding-top: 6px;">
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">别名</span>
                                <input  type="text"  class="form-control"  placeholder="活动介绍" name="tabcar_activity_name" value="{$tabcar_activity_name}">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">课程展示</label>
                        <div class="col-sm-2 col-xs-12" style="padding-top: 6px;">
                            <input  name="tabcar_course_info" value="1" {if $tabcar_course_info==1 || !$tabcar_course_info} checked="checked"{/if} type="radio"> 显示
                            &nbsp;&nbsp;
                            <input  name="tabcar_course_info" value="2" {if $tabcar_course_info==2 } checked="checked"{/if} type="radio"> 不显示
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">别名</span>
                                <input  type="text"  class="form-control"  placeholder="课程展示" name="tabcar_course_name" value="{$tabcar_course_name}">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">解锁福利</label>
                        <div class="col-sm-2 col-xs-12" style="padding-top: 6px;">
                            <input  name="tabcar_gift_info" value="1" {if $tabcar_gift_info==1 || !$tabcar_gift_info} checked="checked"{/if} type="radio"> 显示
                            &nbsp;&nbsp;
                            <input  name="tabcar_gift_info" value="2" {if $tabcar_gift_info==2 } checked="checked"{/if} type="radio"> 不显示
                        </div>
                        <div class="col-sm-3 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">别名</span>
                                <input  type="text"  class="form-control"  placeholder="解锁福利" name="tabcar_gift_name" value="{$tabcar_gift_name}">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="panel panel-default" role="tabpanel">
            <div class="panel-heading">课程展示</div>
            <div class="panel-body">
                <div class="form-horizontal">
                    <div class="form-group">
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">布局设置</label>
                        <div class="col-sm-8 col-xs-12" style="padding-top: 6px;">
                            <input  name="course_style" value="1" {if $item['course_style']==1 || !$item['course_style']} checked="checked"{/if} type="radio"> 展示课程
                            &nbsp;&nbsp;
                            <input  name="course_style" value="2" {if $item['course_style']==2 } checked="checked"{/if} type="radio"> 左侧商家+右侧课程
                            &nbsp;&nbsp;
                            <input  name="course_style" value="3" {if $item['course_style']==3 } checked="checked"{/if} type="radio"> 左侧商家分类+右侧课程
                            &nbsp;
                            <input  name="course_style" value="4" {if $item['course_style']==4 } checked="checked"{/if} type="radio"> 左侧课程分类+右侧课程
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 col-xs-12 control-label">颜色设置</label>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('lcc_c1',$item['colors']['lcc_c1']);}
                            <span class="help-block" style="color: #5c99f7;">未选中背景渐变色1</span>
                            {php echo view_form_field_color('lcc_c2',$item['colors']['lcc_c2']);}
                            <span class="help-block" style="color: #5c99f7;">未选中背景渐变色2</span>
                            {php echo view_form_field_color('lcc_tc',$item['colors']['lcc_tc']);}
                            <span class="help-block" style="color: #5c99f7;">未选中文字颜色</span>
                        </div>
                        <div class="col-sm-4 col-xs-12">
                            {php echo view_form_field_color('lcc_c_c1',$item['colors']['lcc_c_c1']);}
                            <span class="help-block" style="color: #07c160">选中背景渐变色1</span>
                            {php echo view_form_field_color('lcc_c_c2',$item['colors']['lcc_c_c2']);}
                            <span class="help-block" style="color: #07c160">选中背景渐变色2</span>
                            {php echo view_form_field_color('lcc_c_tc',$item['colors']['lcc_c_tc']);}
                            <span class="help-block" style="color: #07c160">选中文字颜色</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="panel panel-default" role="tabpanel">
            <div class="panel-heading">其他设置</div>
            <div class="panel-body">
                <div class="form-horizontal">
                    <div class="form-group" >
                        <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">解锁礼品按钮文字</label>
                        <div class="col-sm-8 col-xs-12">
                            <div class="input-group">
                                <span class="input-group-addon">奖励页-未获得</span>
                                <input  type="text" class="form-control"     placeholder="我要解锁" name="gift_none_btn_txt"  value="{$gift_none_btn_txt}">
                                <span class="input-group-addon">奖励页-已获得</span>
                                <input type="text" class="form-control"    placeholder="已领取" name="gift_has_btn_txt"  value="{$gift_has_btn_txt}">
                            </div>
                            <div class="input-group">
                                <span class="input-group-addon">首页-未获得</span>
                                <input  type="text" class="form-control"     placeholder="报名解锁" name="gift_index_none_btn_txt"  value="{$gift_index_none_btn_txt}">
                                <span class="input-group-addon">首页-已获得</span>
                                <input type="text" class="form-control"    placeholder="已领取" name="gift_index_has_btn_txt"  value="{$gift_index_has_btn_txt}">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="form-group" id="sub_upload5" style="margin-bottom: 6rem;height: 60px;">
            <div class="col-sm-12">
                <input name="submit" onclick="addOrEditItem(5)" id="btnConfirm5" type="button" value="提交" class="btn btn-primary col-lg-2">
            </div>
        </div>
    </form>
</div>

<div class="form-group" style="width: 120px;position: fixed;right: 30px;bottom: 45%;z-index:1000;">
    <div class="col-sm-12">
        <input name="submit" onclick="addOrEditItem(5)" type="button" value="提交" class="btn btn-primary col-lg-2" style="width: 100px;">
    </div>
</div>


<script type="text/javascript">
    //新增\修改奖品 提交数据
    function addOrEditItem(no) {
        let postUrl = "{php echo createWebUrlPlugin('education.setting.edit',array('themeid'=>$themeid));}";
        if (no==1){
            postUrl = "{php echo createWebUrlPlugin('education.setting.edit',array('themeid'=>$themeid,'op'=>'buy_setting'));}";
        }else if(no==2){
            postUrl = "{php echo createWebUrlPlugin('education.setting.edit',array('themeid'=>$themeid,'op'=>'tuan_setting'));}";
        }else if (no==3){
            postUrl = "{php echo createWebUrlPlugin('education.setting.edit',array('themeid'=>$themeid,'op'=>'btm_img_setting'));}";
        }else if (no==4){
            postUrl = "{php echo createWebUrlPlugin('education.setting.edit',array('themeid'=>$themeid,'op'=>'worker_money_setting'));}";
        }else if (no==5){
            postUrl = "{php echo createWebUrlPlugin('education.setting.edit',array('themeid'=>$themeid,'op'=>'common_style_setting'));}";
        }

        let success_redirect = "{php echo createWebUrlPlugin('education.setting',array('themeid'=>$themeid));}";
        var from_no = "#form"+no;
        let formData = $(from_no).serialize();
        $.ajax({
            url:postUrl,
            dataType:'json',
            method:'post',
            data:formData,
            success:function (e) {
                let status = e.status;
                let result = e.result;
                if (status!=1){
                    layer.msg(result.msg)
                }else{
                    layer.msg(result.msg);
                    window.location.href = success_redirect;
                }
            },
            fail:function (err) {
                console.log(err)
            }
        })
    }
</script>
